<template>
  <div id="hello">
    <button @click="printDemo">测试打印</button>
    <vue-easy-print table-show ref="easyPrint">
      <print :printData='printData'></print>
    </vue-easy-print>
  </div>
</template>

<script>
import vueEasyPrint from "vue-easy-print";
import print from "./print";
export default {
  name: "HelloWorld",
  data() {
    return {
      printData: [
        "",
        "",
        "",
        "",
        "",
        "",
        "",
        "",
        "",
        "",
        "",
        "",
        "",
        "",
        "",
        "",
        "",
        "",
        "",
        "",
        "",
        "",
        "",
        "",
        "",
        "",
        "",
        "",
        "",
        "",
        "",
        "",
        "",
        "",
        "",
        "",
        "",
        "",
        "",
        "",
        "",
        "",
        "",
        "",
        "",
        "",
        "",
        "",
        "",
        "",
        "",
        "",
        "",
        "",
        "",
        "",
        "",
        "",
        "",
        ""
      ]
    };
  },
  methods: {
    printDemo() {
      this.$refs.easyPrint.print();
    },
    aa (e) {
      console.log(e)
    }
  },
  components: {
    vueEasyPrint,
    print
  }
};
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
</style>
